Avoid calls to CHAR_TO_BYTE if byte position is known.
authorDmitry Antipov <dmantipov@yandex.ru>
Thu, 20 Dec 2012 16:09:05 +0000 (20:09 +0400)
committerDmitry Antipov <dmantipov@yandex.ru>
Thu, 20 Dec 2012 16:09:05 +0000 (20:09 +0400)
commita742611013be8d54abdc6b95f1b8d3150cf76883
treeec3c951ee00461ccf2bf16438f08caf34687ea9d
parentb891404eb4bf8b4e28eaaf9406d73487caf3d322
Avoid calls to CHAR_TO_BYTE if byte position is known.
* editfns.c (make_buffer_string_both): Use move_gap_both.
(Fbuffer_string): Use make_buffer_string_both.
* marker.c (buf_charpos_to_bytepos): Convert to eassert.
Adjust comment.
(buf_bytepos_to_charpos): Likewise.
(charpos_to_bytepos): Remove.
* fileio.c (Finsert_file_contents): Use move_gap_both.
* search.c (Freplace_match): Likewise.
* process.c (process_send_region): Likewise. Use convenient
names for byte positions.
* lisp.h (charpos_to_bytepos): Remove prototype.
* indent.c (scan_for_column): Use CHAR_TO_BYTE.
* insdel.c (move_gap): Likewise.
src/ChangeLog
src/editfns.c
src/fileio.c
src/indent.c
src/insdel.c
src/lisp.h
src/marker.c
src/process.c
src/search.c